package linearsearcharray;

public class LinearSearchArray {
    public static int linearSearch(int[] list, int key) {
        for (int i = 0; i < list.length; i++) {
            if(key == list[i])
                return i + 1;
        }
        return 0;
    }
}
